#ifndef _SMAT_RANSAC_H_
#define _SMAT_RANSAC_H_

#include <pthread.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <semaphore.h>

#include <cv.h>
#include <cxcore.h>
#include <highgui.h>
#include "videoAVI.h"

#include <queue>


typedef struct {
    boost::shared_ptr<CvMat> *smat_pts;
    boost::shared_ptr<SMATModel> *smat;
    boost::shared_ptr<IplImage> *src;
    CvMat * mask_show;
    CvMat * maskout;
    CvMat * pointsID;
    CvMat * points3D;
    CvMat * translation;
    CvMat * vect;
    CvMat *vect_media;
    CvMat *angY;
    int inliers;
    float error;
    CALIBRATION_PARAMS_t *cal;
    bool quit;
    CvScalar desplazar_parche;
    bool raw_video;
    sem_t *sem1;
    sem_t *sem2;
    IplImage * img_smat;
    pthread_t pthread;
    int n;
    CvMat * chesscorners;
} thread_params_t;


int start_SMART_RANSAC_threads(thread_params_t * params_left, thread_params_t * params_rigth);
void * SMAT_RANSAC_thread(void * params);
int SMAT (thread_params_t * p);
int RANSAC (thread_params_t * p);
int SMAT_RANSAC2 (thread_params_t * p);


#ifdef _SMAT_RANSAC_CPP_



#else


#endif //_SMAT_RANSAC_CPP_
#endif //_SMAT_RANSAC_H_


